package com.xoa.dao.workflow;

import com.xoa.dao.base.BaseMapper;
import com.xoa.model.workflow.FlowFormType;

import java.util.List;
import java.util.Map;

import com.xoa.model.workflow.FlowFormTypeExtends;
import com.xoa.model.workflow.FlowTypeModel;
import com.xoa.util.common.wrapper.BaseWrapper;
import org.apache.ibatis.annotations.Param;


public interface FlowFormTypeMapper extends BaseMapper<FlowFormType> {

    List<FlowFormType> selectFlowFormType(Map<String, Object> maps);

    FlowFormType qureyItemMax(@Param("formId") Integer formId);

    int updateItemMax(FlowFormType flowFormType);


    List<FlowFormType> selectFormBySort(@Param("sortId") Integer sortId);

    List<FlowFormType> queryBySearchValue(@Param("searchValue") String searchValue, @Param("sortId") Integer sortId);

    int insertSelectParam(FlowFormType flowFormType);

    int updateSelectParam(FlowFormTypeExtends flowFormType);

    int checkFormUserNumber(@Param("formId") Integer formId);

    int deleteForm(@Param("formId") Integer formId);

    List<FlowFormType> selectAllForm();

    int updateContent(@Param("feedId") Integer feedId,
                      @Param("signLook") Integer signLook,
                      @Param("content") String cintent);

    int deleteContent(@Param("feedId") Integer feedId);

    //兼容错误数据，正常情况只能查出一条数据
    List<FlowFormType> getForm(Integer flowId);

    List<FlowFormType> selectForm(@Param("sortId") Integer sortId);

    //获取当前部门下的所有表单
    List<FlowFormType> selectFormByDeptId(@Param("deptId") Integer deptId);

    int updateMobileDataSort(@Param("mobileDataSort") String mobileDataSort, @Param("formId") Integer formId);

    String getMobileDataSort(Integer formId);

}